package com.cecsmsserve.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.cecsmsserve.entity.DiningFeedback;
import com.cecsmsserve.util.result.CommonResult;

import java.util.List;

public interface DiningFeedbackService extends IService<DiningFeedback> {
    CommonResult insert(DiningFeedback diningFeedback);
    
    CommonResult reply(DiningFeedback diningFeedback);
    
    CommonResult selectByUserId(Integer userId);
    
    CommonResult selectByPage(Integer pageNum, Integer pageSize);
    
    CommonResult selectHandled(Integer pageNum, Integer pageSize);

    CommonResult selectUnhandled(Integer pageNum, Integer pageSize);

    // 提交反馈
    boolean submitFeedback(DiningFeedback feedback);
    
    // 回复反馈
    boolean replyFeedback(Integer id, String reply);
    
    // 直接执行SQL回复反馈
    boolean directReplyFeedback(Integer id, String reply);
    
    // 获取用户的反馈列表
    List<DiningFeedback> getUserFeedbacks(Integer userId);
    
    // 获取未处理的反馈列表
    List<DiningFeedback> getUnhandledFeedbacks();
} 